package com.salary.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.salary.entity.SalaryRecord;

@Repository
public interface SalaryRecordRepository
		extends PagingAndSortingRepository<SalaryRecord, Long>, JpaSpecificationExecutor<SalaryRecord> {
	@Query("from SalaryRecord s where s.staff.staffName like %?1%")
	public List<SalaryRecord> findLikeStaffName(String staffName);
	@Query("from SalaryRecord s where s.staff.staffNum like %?1%")
	public List<SalaryRecord> findLikeStaffNum(String staffNum);
	
}
